#ifndef EXPRESSIONS_H
#define EXPRESSIONS_H

#include <wx/regex.h>

wxRegEx reClass( wxT(
                   "^[[:space:]]*"                 // Space at the beginning of the line.
                   "class[[:space:]]+"             // The word class, followed by some space (at least one).
                   "([^[:space:]\\:]+)"            // The class name (made of no space and no colon).
                 ) );


wxRegEx reStruct( wxT(
                    "^[[:space:]]*"                 // Space at the beginning of the line.
                    "(typedef"                      // Maybe a typedef declaration.
                    "[[:space:]]+)?"                // Followed by at least one space.
                    "struct[[:space:]]+"            // The word struct, followed by some space (at least one).
                    "([^[:space:]\\:\\{\\;]+)"      // The struct name (made of no space, no colon, no bracket, no semicolon).
                  ) );



wxRegEx reTypedef( wxT(
                     "^[[:space:]]*"                 // Space at the beginning of the line.
                     "typedef[[:space:]]+"           // The typedef word followed by at least one space.
                     "(.+)[[:space:]]+"              // The original type, followed by at least one space.
                     "([^\\{[:space:];]+)"           // The new type, not made of any space nor braces, nor semicolon.
                   ) );


wxRegEx reEnum( wxT(
                  "^[[:space:]]*"                 // Space at the beginning of the line.
                  "enum[[:space:]]+"              // The word class, followed by some space (at least one).
                  "([^[:space:]\\:]+)"            // The class name (made of no space and no colon).
                ) );


wxRegEx reFunction( wxT(
                      "^[[:space:]]*"                 // Space at the beginning of the line.
                      "((.+)[[:space:]])"             // The return type of the function.
                      "([[:space:]]*)"                // Possibly some space after the name.
                      "([^[:space:]]+)\\("            // The name of the function, followed by a "(".
                      "([^)]*)?"                      // The function's parameters.
                      "\\)"                           // The closing parenthesis.
                    ),
                    wxRE_ADVANCED );

wxRegEx reClassFunction( wxT(
                           "^[[:space:]]*"                 // Space at the beginning of the line.
                           "((.+)[[:space:]])"             // The return type of the function.
                           "([[:space:]]*)"                // Some space after the return type.
                           "([^[:space:]]+)\\::"           // The class name followed by "::".
                           "([^[:space:]]+)\\("            // The name of the function, followed by a "(".
                           "([^)]*)?"                      // The function's parameters.
                           "\\)"                           // The closing parenthesis.
                         ),
                         wxRE_ADVANCED );


wxRegEx reClassFunctionNoRet( wxT(
                                "^[[:space:]]*"                 // Space at the beginning of the line.
                                "([^[:space:]]+)\\::"           // The class name followed by "::".
                                "([^[:space:]]+)\\("            // The name of the function, followed by a "(".
                                "([^)]*)?"                      // The function's parameters.
                                "\\)"                           // The closing parenthesis.
                              ) );

#endif
